$(function(){
	
	var bool = false;
	
	$("#verifyForm").submit(function(){
		
		var email = $("#LKEmail").text();
		var code = $("#validatecode").val();
		if (code == ""){
			$("#errorMsg").html("验证码不能为空");
			return bool;
		}

		$.ajax({
				"url":"emailVerify",
				"type":"post",
				"data":{"email":email,"code":code},
				"dataType":"json",
				"success":function(ok,status){
					bool=ok;
				},
				"async":false});
		if (bool){
			$("#errorMsg").html("");
		}else{
			$("#errorMsg").html("验证码错误");
		}
		return bool;
	});
	
});